<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp"%>
<html>
	<head>
		<meta charset="UTF-8">
		<title>用户中心-我的共富券</title>
		<jsp:include page="/include/wchat/head.jsp"></jsp:include>
		<link type="text/css" rel="stylesheet"
			href="/v2/wchat/resrc/css/account.css">
	</head>
<style>
.invest-tb li.c1 {
	width: 40%;
}

.invest-tb li.c2 {
	width: 35%;
	text-align: left;
}
</style>
	<body>
		<div id="header">
			<a href="/wchatAccount.do" class="backto">返回</a>
			<div class="title-sub">
				我的共富券
			</div>
		</div>
		<div id="wrap">
			<div class="table invest-tb">
				<ul class="items title">
					<li class="c1">
						共富券/有效期
					</li>
					<li class="c2">
						适用范围
					</li>
					<li class="c3">
						剩余金额/次数
					</li>
				</ul>
				<s:if
					test="#request.voucherRecordList!=null || #request.voucherRecordList.size>0">
					<s:iterator value="#request.voucherRecordList" var="bean">
						<ul class="items">
							<li class="c1">
								<s:if test="#bean.voucherType==1">
		             				投资抵用券
		             			</s:if>
								<s:else>
		             				共富券
		             			</s:else>
								<span class="date">
									${bean.createTimeFormat}~${bean.deadTimeFormat} </span>
							</li>
							<li class="c2">
								<a href="/wchatIndex.do">${bean.productLimit}</a>
							</li>
							<li class="c3">
								<span class="money"><em>￥</em>${bean.remainMoney}</span>
								<span class="status"> <s:if test="#bean.usableStatus==1">
										<s:if test="#bean.usableCounts==1">仅限一次</s:if>
										<s:elseif test="#bean.usableCounts==0">已用完</s:elseif>
									</s:if> <s:elseif test="#bean.usableStatus==2">已用完</s:elseif> <s:elseif
										test="#bean.usableStatus==3">已过期</s:elseif> </span>
							</li>
						</ul>
					</s:iterator>
					<div class="page">
						<s:if test="#request.currentPage == 1">
							<span class="disabled pre"> 上一页 </span>
						</s:if>
						<s:else>
							<a href="javascript:;"
								onclick="return gotoPage(${currentPage - 1});" class="pre">
								上一页 </a>
						</s:else>

						<s:if test="#request.currentPage == #request.totalPageNum">
							<span class="disabled next"> 下一页 </span>
						</s:if>
						<s:else>
							<a href="javascript:;"
								onclick="return gotoPage(${currentPage + 1});" class="next">
								下一页 </a>
						</s:else>
					</div>
				</s:if>
				<s:else>
					<div class="no-project">
						<div class="inner">
							暂无内容
						</div>
					</div>
				</s:else>
			</div>
		</div>
		<form id="pageSearchForm" name="pageSearchForm" action=""
			method="post"></form>
		<jsp:include page="/include/wchat/footer.jsp"></jsp:include>
<script type="text/javascript">
	function gotoPage(page){
	    $('#pageSearchForm').action = environment.basePath + 'getYlbInvestorRecord.do';
	    var htmlStr = '<input type="hidden" name="currentPage" value="' + page + '" />';
	    $("#pageSearchForm").html(htmlStr).submit();
	}
</script>
	</body>
</html>